package edu.hubu.controller;

import edu.hubu.commons.ResultsJson;
import edu.hubu.model.User;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;

import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author moonlan
 * @date 2020/10/20 下午4:22
 */
public abstract class UserCurdController extends CurdController<User> {


//    @ApiImplicitParams({@ApiImplicitParam(name = "userId", value = "用户Id", dataType = "String", required = true),
//                        @ApiImplicitParam(name = "userPassword", value = "密码", dataType = "String", required = true),
//                        @ApiImplicitParam(name = "checkCode", value = "验证码", dataType = "String", required = true),})
    @PermitAll
    public abstract ResultsJson login(String userId, String userPassword, String checkCode, HttpServletRequest request);


    public abstract ResultsJson logout(HttpServletRequest request, HttpServletResponse response, String token);


}
